<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>:first-child</title>
<link type="text/css" rel="stylesheet" href="style/style.css" tppabs="http://www.erdangjiade.com/manual/jquery/jquery/style/style.css"  />
</head>
<body id="split">
<div id="content">
  
  <div rel="firstChild">
    <h2><span>返回值:Array&lt;Element(s)&gt;</span>:first-child</h2>
    <h3><em>V1.1.4</em>概述</h3>
    <div class="desc">
      <p>匹配第一个子元素</p>
      <div class="longdesc">
        <p>':first' 只匹配一个元素，而此选择符将为每个父元素匹配一个子元素</p>
      </div>
    </div>
    <div class="example">
      <h3>示例</h3>
      <span id="f_ad2"></span>
      <h4>描述:</h4>
      <p>在每个 ul 中查找第一个 li</p>
      <h5>HTML 代码:</h5>
      <pre><code>&lt;ul&gt;
  &lt;li&gt;John&lt;/li&gt;
  &lt;li&gt;Karl&lt;/li&gt;
  &lt;li&gt;Brandon&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
  &lt;li&gt;Glen&lt;/li&gt;
  &lt;li&gt;Tane&lt;/li&gt;
  &lt;li&gt;Ralph&lt;/li&gt;
&lt;/ul&gt;</code></pre>
      <h5>jQuery 代码:</h5>
      <pre><code>$("ul li:first-child")</code></pre>
      <h5>结果:</h5>
      <pre><code>[ &lt;li&gt;John&lt;/li&gt;, &lt;li&gt;Glen&lt;/li&gt; ]</code></pre>
    </div>
  </div>
</div>
</body>
</html>
<div style="display:none">

<script type="text/javascript">
var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://");
document.write(unescape("%3Cscript src='" + _bdhmProtocol + "hm.baidu.com/h.js%3F327b016d332d3a7e4043796cab725707' type='text/javascript'%3E%3C/script%3E"));
</script>
</div>T